<html>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

    <%@ page contentType="text/html; charset=UTF-8" %>
    <f:view>
        <head>
            <title>Menu użytkownika</title>
        </head>
        <body>
            <h:form>
                <p><h:commandLink action="addDiscipline" value="Dodaj dyscypline" rendered="#{bettor.admin}"/></p>
                <p><h:commandLink action="addBettor" value="Dodaj użytkownika" rendered="#{bettor.admin}"/></p>
                <p><h:commandLink action="addLeague" value="Dodaj lige" rendered="#{bettor.admin}"/></p>
                <p><h:commandLink action="addGame" value="Dodaj mecz" rendered="#{bettor.admin}"/></p>
                <p><h:commandLink action="addMarket" value="Dodaj rynek" rendered="#{bettor.admin}"/></p>
                <p><h:outputText value="Witaj #{bettor.name} !" rendered="#{bettor.loggedIn && !bettor.admin}"/><br>
                <h:outputText value="Stan konta: #{bettor.balance}" rendered="#{bettor.loggedIn && !bettor.admin}"/></p>
                <p><h:commandLink action="deposit" value="Wplata" rendered="#{bettor.loggedIn && !bettor.admin}"/></p>
                <p><h:commandLink action="withdrawal" value="Wyplata" rendered="#{bettor.loggedIn && !bettor.admin}"/></p>
                <p><h:commandLink action="login" value="Zaloguj sie" rendered="#{!bettor.loggedIn}" /></p>
                <p><h:outputText value="Nie masz jeszcze konta? " rendered="#{!bettor.loggedIn && !bettor.admin}"/>
                    <h:commandLink action="register" value="Zarejestruj sie" rendered="#{!bettor.loggedIn && !bettor.admin}" /></p>
                <p><h:commandLink action="#{bettor.wyloguj}" value="Wyloguj" rendered="#{bettor.loggedIn}"/></p>
                <p><h:dataTable var="oneDiscipline" value="#{discipline.allDisciplines}" width="100%" border="0" rendered="#{bettor.loggedIn && !bettor.admin}">
                        <f:facet name="header">
                            <h:outputText value="Lista dyscyplin" />
                        </f:facet>

                        <h:column>
                            <h:outputText value="#{oneDiscipline.name}" />
                        </h:column>

                </h:dataTable></p>
            </h:form>
        </body>
    </f:view>
</html>